#pragma once
#include "sceneobject.h"
#include "Color4.h"
#include "Material.h"
#include "Ray.h"

class CGeometry :
	public CSceneObject
{
public:
	CGeometry(void);
	virtual ~CGeometry(void);

	virtual bool IsIntersect(const CRay& vRay, DATA_TYPE& t, bool& bInside, CVector3D& vNormal) const = 0;

	const CColor4& GetColor() const { return m_vColor; }
	const CMaterial& GetMaterial() const { return m_material; }

	virtual DATA_TYPE GetMaxValue(int iAxis) const = 0;
	virtual DATA_TYPE GetMinValue(int iAxis) const = 0;

protected:
	CColor4 m_vColor;
	CMaterial m_material;
};

typedef boost::shared_ptr<CGeometry> CGeometryPtr;